import React, { Component } from "react";
import { withRouter } from "react-router-dom";
import {observer} from 'mobx-react';
import { Tools, Icon } from 'weaver-mobile';

const getLabel = Tools.getLabel;

@withRouter
@observer
export default class LocationInfo extends Component {
    render(){
        const {store} = this.props;
        const {currTime, locationInfo} = store;

        return (
            <div className='info'>
                <div>
                    <div className='icon'><Icon type='mail-timing-transmission' /></div>
                    <div className='lbl'>{getLabel('18949','打卡时间')}:</div>
                    <div className='val'>{currTime.format('HH:mm:ss')}</div>
                </div>
                <div>
                    <div className='icon'><Icon type='location' /></div>
                    <div className='lbl'>{getLabel('504544','打卡地点')}:</div>
                    <div className='val text-elli'>{locationInfo.address || ''}</div>
                </div>
            </div>
        )
    }
}